Ext.define("Triends.Model.AttendeeList",{
	extend: "Ext.data.Model",
	config: {
		fields: [
			"ID", "Name", "Email", "Age", "Gender", "Introduction", "Cacao", "UserLat", "UserLng", "UserTheme", "Distance", "Time", "Theme", "Total", "Wifi"
		]
	}
});

Ext.define('Triends.view.AttendeeList', {
	extend: 'Ext.Panel',
	xtype: 'attendeelist',
	id: 'attendeelist',
	config: {
		layout: 'vbox',
		style: 'border-top:1px #CBCAC7 solid;margin-bottom:10px;',
		minHeight: 120,
		items: [{
		    	xtype: 'panel',
		    	style: 'margin-top:15px;margin-left:10px',
		    	html: "<p style='margin-left:10px'><font size='4'><b>Attendee</b></font></p>"
			},
			{
				xtype: 'panel',
				style: {'margin':'5px'},
				items:[{
						xtype: 'list',
						width: '98.2%',
						id: 'attendeelistpanel',
						pressedCls: "x-item-selected1",
						selectedCls: "",
						pressedDelay: 50,
						style: 'margin-left:5px',
						scrollable: false,
						itemTpl:
								"<table width='100%'>"+
									"<tr>" +
										"<td rowspan='2' align='center' valign='center' width=50 style='word-break:break-all;'><img src='https://graph.facebook.com/{ID}/picture' width='48px' height='48px'></td>" +
										"<td valign='center' style='padding-left:20px'><font size='4'>{Name}</font></td>" +
										"<td width=50 style='margin-bottom:-10px'><img src='resource/images/wifi{Wifi}.png' width='40px' height='40px'></td>"+
										"<td rowspan='2' align='center' width=50>{Total}%</td>"+
									 "</tr>" +
									"<tr>" +
										"<td></td>" +
										"<td align='center' width=50 style='padding-top:-10px'>T-fi</td>"+
									"</tr>"+
								"</table>",
				    	listeners: {
	    	   				itemtap: function(list, index, target, model, e, eOpts) {
		    					var otherid = model.getData().ID;
		    					var cacaocheck;
											if (Ext.getCmp('tingjoinbtn').isHidden() == false) {
  												cacaocheck = 'cannot';
  											} else {
  												cacaocheck = 'can'
  											}
								openOtherinfo(otherid, cacaocheck)
		    	  		}
					}
				}]
		}]
  	}
});
	
	 
				
		 				